home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-07 | 11.8 KB | 359 lines | [TEXT/MPS ] |
- /*
- File: AlbumInfoPage.r
-
- Contains: Aspect and Information page resources for album sample template
-
- Written by: Harry Chesley, Steve Fisher, Bruce Gaya
-
- Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- 5/6/93 BG revised for 1993 WWDC
-
- To Do:
- */
-
- #include "Types.r"
- #include "OCETemplates.h"
- #include "OCE.r"
-
- // --------------------------------------------------------------------
- // --------------------------------------------------------------------
- //
- // Album Main Aspect
- //
- // --------------------------------------------------------------------
- // --------------------------------------------------------------------
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // BOOKKEEPING - this is an aspect template with this base resource id
- //
- /////////////////////////////////////////////////////////////////////////
-
- #define kAlbumMainAspect kDETFirstID
-
- resource 'deta' (kAlbumMainAspect, purgeable) {
- 0, // Drop priority
- dropCheckAlways, // Drop check flag
- isMainAspect // Is the main aspect
- };
-
- resource 'rstr' (kAlbumMainAspect+kDETTemplateName, purgeable) {
- "Album Main Aspect"
- };
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // BINDING - associate this aspect with records of this type
- //
- /////////////////////////////////////////////////////////////////////////
-
- resource 'rstr' (kAlbumMainAspect+kDETRecordType, purgeable) {
- "Album"
- };
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // BEHAVIOR - record icon’s behaviour
- //
- /////////////////////////////////////////////////////////////////////////
-
- resource 'rst#' (kAlbumMainAspect+kDETAspectCategory,purgeable)
- {{
- "Recordings"
- }};
-
- resource 'rstr' (kAlbumMainAspect+kDETAspectNewMenuName, purgeable) {
- "New Album"
- };
-
- resource 'rstr' (kAlbumMainAspect+kDETAspectNewEntryName, purgeable) {
- "untitled album"
- };
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // USER INTERFACE RESOURCES - for looking good
- //
- /////////////////////////////////////////////////////////////////////////
-
- resource 'rstr' (kAlbumMainAspect+kDETAspectKind, purgeable) {
- "album"
- };
-
- resource 'rstr' (kAlbumMainAspect+kDETAspectWhatIs, purgeable) {
- "Album\n\nA description of an album."
- };
-
-
- // icons
-
- include "AlbumIcons" 'ICN#'(0) as 'ICN#'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'icl4'(0) as 'icl4'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'icl8'(0) as 'icl8'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'ics#'(0) as 'ics#'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'ics4'(0) as 'ics4'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'ics8'(0) as 'ics8'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'SICN'(0) as 'SICN'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
-
- /////////////////////////////////////////////////////////////////////////
- //
- // ASPECT PROPERTIES - shared between aspect and info page(s)
- //
- /////////////////////////////////////////////////////////////////////////
-
- #define prTitle kDETFirstDevProperty
- #define prArtist kDETFirstDevProperty + 1
- #define prComments kDETFirstDevProperty + 2
- #define prFormat kDETFirstDevProperty + 3
- #define prCover kDETFirstDevProperty + 4
- #define prVinylSpeed kDETFirstDevProperty + 5
-
- //----------------------------------------------------------------------
- //
- // Lookup resource - what attributes to lookup,
- // how to assign them to properties
- //
- //----------------------------------------------------------------------
- resource 'dett' (kAlbumMainAspect+kDETAspectLookup, purgeable) {
- {
- {"Album General Info"}, typeBinary,
- useForInput, useForOutput, notInSublist, isNotAlias, isNotRecordRef,
- {
- 'rstr', prTitle, 0;
- 'rstr', prArtist, 0;
- 'rstr', prComments, 0;
- 'word', prFormat, 0;
- 'word', prVinylSpeed, 0;
- };
- {"Album Cover"}, typeBinary,
- useForInput, useForOutput, notInSublist, isNotAlias, isNotRecordRef,
- { 'rest', prCover , 0 };
- }
- };
-
- //----------------------------------------------------------------------
- //
- // Default property values - show this if attributes are missing
- //
- //----------------------------------------------------------------------
-
- resource 'rstr' (kAlbumMainAspect+prTitle) {
- "<Put the album’s full title here.>"
- };
-
- resource 'rstr' (kAlbumMainAspect+prArtist) {
- "<Put the album’s recording artist or group here.>"
- };
-
- resource 'rstr' (kAlbumMainAspect+prComments) {
- "<Put comments here. Did you like it? What's the best track?>"
- };
-
- resource 'detn' (kAlbumMainAspect+prFormat) {
- 1
- };
-
- resource 'detn' (kAlbumMainAspect+prVinylSpeed) {
- 1
- };
-
- include "AlbumIcons" 'detb'(0) as 'detb'(kAlbumMainAspect+prCover, purgeable);
-
-
- //----------------------------------------------------------------------
- //
- // Balloon help for the properties
- //
- //----------------------------------------------------------------------
-
- resource 'rst#' (kAlbumMainAspect+kDETAspectBalloons,purgeable) {
- {
- "The full title.", "The full title. Uneditable because the record is locked or access controled.",
- "The artist or group.", "The artist or group. Uneditable because the record is locked or access controled.",
- "Comments.", "Comments. Uneditable because the record is locked or access controled.",
- "Format.", "Format. Uneditable because the record is locked or access controled."
- "Album’s cover.", "Album’s cover. Uneditable because the record is locked or access controled."
- "Cassette type", "Cassette type. Uneditable because the record is locked or access controled."
- "Record speed", "Record speed. Uneditable because the record is locked or access controled."
- }
- };
-
-
- // --------------------------------------------------------------------
- // --------------------------------------------------------------------
- //
- // Album Information Page
- //
- // --------------------------------------------------------------------
- // --------------------------------------------------------------------
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // BOOKKEEPING - this is an information page template with this base resource id
- // and this view
- //
- /////////////////////////////////////////////////////////////////////////
-
- #define kAlbumInfoPage kDETSecondID
-
-
- resource 'deti' (kAlbumInfoPage, purgeable) {
- 1000,
- {0, 0, 0, 0},
- selectFirstText,
- {
- kDETNoProperty, kDETNoProperty, kAlbumInfoPage;
- prFormat, kDETFirstConstantProperty + 3, kAlbumInfoPage + 1;
- },
- {
- }
- };
-
- resource 'rstr' (kAlbumInfoPage+kDETTemplateName, purgeable) {
- "Album 1st Info Page"
- };
-
- resource 'rstr' (kAlbumInfoPage+kDETInfoPageName, purgeable) {
- "General Info"
- };
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // BINDING - associate this information page with records of this type
- // and with this aspect
- //
- /////////////////////////////////////////////////////////////////////////
-
- resource 'rstr' (kAlbumInfoPage+kDETRecordType, purgeable) {
- "Album"
- };
-
- resource 'rstr' (kAlbumInfoPage+kDETInfoPageMainViewAspect, purgeable) {
- "Album Main Aspect"
- };
-
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // VIEWS - what you see in this information page
- //
- /////////////////////////////////////////////////////////////////////////
-
- #define kCoverTop (kDETSubpageIconBottom + 8)
- #define kCoverLeft (kDETSubpageIconLeft-2)
- #define kCoverBottom (kCoverTop + 175)
- #define kCoverRight (kCoverLeft + 175)
-
- #define k1stColumnLeft (kCoverRight+4)
- #define k1stColumnRight (k1stColumnLeft+65)
- #define k2ndColumnLeft (k1stColumnRight+4)
- #define k2ndColumnRight (kDETRecordInfoWindWidth - 8)
-
- #define kTitleTop (kCoverTop)
- #define kTitleBottom (kTitleTop + kDETAppFontLineHeight + 4)
- #define kArtistTop (kTitleBottom + 6)
- #define kArtistBottom (kArtistTop + kDETAppFontLineHeight + 4)
- #define kFormatTop (kArtistBottom + 6)
- #define kFormatBottom (kFormatTop + kDETAppFontLineHeight + 4)
- #define kNumFormats (3)
- #define kCDRadioLeft (k2ndColumnLeft)
- #define kCDRadioRight (kCDRadioLeft + 35)
- #define kCassetteRadioLeft (kCDRadioRight)
- #define kCassetteRadioRight (kCassetteRadioLeft + 60)
- #define kVinylRadioLeft (kCassetteRadioRight)
- #define kVinylRadioRight (k2ndColumnRight)
- #define kCommentsTop (kFormatBottom + 32)
- #define kCommentsLabelBottom (kCommentsTop + kDETAppFontLineHeight + 4)
- #define kCommentsBottom (kCoverBottom)
-
- #define kConditionalTop (kFormatBottom + 4)
- #define kConditionalBottom (kConditionalTop + kDETAppFontLineHeight + 4)
- #define k33RadioLeft (k2ndColumnLeft)
- #define k33RadioRight (kCDRadioLeft + 35)
- #define k45RadioLeft (k33RadioRight)
- #define k45RadioRight (k45RadioLeft + 35)
- #define k78RadioLeft (k45RadioRight)
- #define k78RadioRight (k45RadioRight + 35)
-
- resource 'detv' (kAlbumInfoPage, purgeable) {
- {
- kDETSubpageIconRect, kDETNoFlags, kDETAspectMainBitmap,
- Bitmap { kDETLargeIcon };
-
-
- {kTitleTop, k1stColumnLeft, kTitleBottom, k1stColumnRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold,
- "Full title:" };
-
- {kTitleTop-2, k2ndColumnLeft, kTitleBottom-2, k2ndColumnRight}, kDETEnabled, prTitle,
- EditText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal };
-
-
- {kArtistTop, k1stColumnLeft, kArtistBottom, k1stColumnRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold,
- "Artist:" };
-
- {kArtistTop-2, k2ndColumnLeft, kArtistBottom-2, k2ndColumnRight}, kDETEnabled, prArtist,
- EditText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal };
-
-
- {kFormatTop, k1stColumnLeft, kFormatBottom, k1stColumnRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold,
- "Format:" };
-
- {kFormatTop, kCDRadioLeft, kFormatBottom, kCDRadioRight}, kDETEnabled, prFormat,
- RadioButton { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal,
- "CD", prFormat, 1 };
-
- {kFormatTop, kCassetteRadioLeft, kFormatBottom, kCassetteRadioRight}, kDETEnabled, prFormat,
- RadioButton { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal,
- "Cassette", prFormat, 2 };
-
- {kFormatTop, kVinylRadioLeft, kFormatBottom, kVinylRadioRight}, kDETEnabled, prFormat,
- RadioButton { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal,
- "Vinyl", prFormat, 3 };
-
- {kCommentsTop, k1stColumnLeft, kCommentsLabelBottom, k1stColumnRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold,
- "Comments:" };
-
- {kCommentsLabelBottom, k1stColumnLeft, kCommentsBottom-2, k2ndColumnRight}, kDETEnabled + kDETMultiLine, prComments,
- EditText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal };
-
- { kCoverTop, kCoverLeft, kCoverBottom, kCoverRight }, kDETNoFlags, prCover,
- EditPicture { 8 };
- }
- };
-
- resource 'detv' (kAlbumInfoPage + 1, purgeable) {
- {
- {kConditionalTop, k1stColumnLeft, kConditionalBottom, k1stColumnRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold,
- "Speed:" };
-
- {kConditionalTop, k33RadioLeft, kConditionalBottom, k33RadioRight}, kDETEnabled, prVinylSpeed,
- RadioButton { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal,
- "33", prVinylSpeed, 1 };
-
- {kConditionalTop, k45RadioLeft, kConditionalBottom, k45RadioRight}, kDETEnabled, prVinylSpeed,
- RadioButton { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal,
- "45", prVinylSpeed, 2 };
-
- {kConditionalTop, k78RadioLeft, kConditionalBottom, k78RadioRight}, kDETEnabled, prVinylSpeed,
- RadioButton { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal,
- "78", prVinylSpeed, 3 };
- }
- };
-
-
-